﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace proba
{
    public partial class Highscore : Form
    {
        
        public Highscore()
        {

            InitializeComponent();
           
        }

        private void Form3_Load(object sender, EventArgs e)
        {
            

            string[] scores = File.ReadAllLines("Highscores.txt");
           
            var novi = scores.OrderByDescending(x => int.Parse(x.Split(' ')[1]));
            foreach (var score in novi)
            {
                label1.Text += score + Environment.NewLine;
            }

        }
          
        
        private void roundButton1_nazad_Click(object sender, EventArgs e)
        {
            this.Close();
        }

            
    }
}

